﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonLib;

namespace CommonDAL
{
    public abstract class DataEntityL<TUniqueKey, TBusinessEntity> :
        DataEntity<long, TUniqueKey, TBusinessEntity>
        where TUniqueKey : struct
        where TBusinessEntity : class, IBusinessEntity<TUniqueKey>
    {
        public DataEntityL(
            long identity,
            TBusinessEntity businessEntity,
            long version) : base(identity, businessEntity, version)
        {
        }

        public DataEntityL(
            TBusinessEntity businessEntity) : base(businessEntity)
        {
        }
    }

    public class LazyDataEntityL<TUniqueKey, TBusinessEntity, TDataEntity> :
        LazyDataEntity<long, TUniqueKey, TBusinessEntity, TDataEntity>
        where TUniqueKey : struct
        where TBusinessEntity : class, IBusinessEntity<TUniqueKey>
        where TDataEntity : class, IDataEntityL<TUniqueKey, TBusinessEntity>, TBusinessEntity
    {
        public LazyDataEntityL(
            long identity,
            IDataEntityFinder<long, TUniqueKey, TBusinessEntity, TDataEntity> finder) :
            base(identity, finder)
        {
        }
    }
}
